<?php
/**
 * Created by PhpStorm.
 * User: edmmss
 * Date: 2019/1/29
 * Time: 09:41
 */

namespace app\modules\entityAttributeValue;


class Attribute
{
    private $_values;

    private $_name;

    public function __construct(string $name)
    {
        $this->_values = new \SplObjectStorage();
        $this->_name = $name;
    }

    public function addValue(Value $value)
    {
        $this->_values->attach($value);
    }

    public function getValues(): \SplObjectStorage
    {
        return $this->_values;
    }

    public function __toString(): string
    {
        // TODO: Implement __toString() method.
        return $this->_name;
    }
}